package cn.stylefeng.guns.modular.goodsCart.mapper;

import cn.stylefeng.guns.modular.goodsCart.entity.TaoGoodCart;
import cn.stylefeng.guns.modular.goodsCart.model.params.TaoGoodCartParam;
import cn.stylefeng.guns.modular.goodsCart.model.result.TaoGoodCartResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 购物车 Mapper 接口
 * </p>
 *
 * @author lcw
 * @since 2019-09-25
 */
public interface TaoGoodCartMapper extends BaseMapper<TaoGoodCart> {

    /**
     * 获取列表
     *
     * @author lcw
     * @Date 2019-09-25
     */
    List<TaoGoodCartResult> customList(@Param("paramCondition") TaoGoodCartParam paramCondition);

    /**
     * 获取map列表
     *
     * @author lcw
     * @Date 2019-09-25
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") TaoGoodCartParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author lcw
     * @Date 2019-09-25
     */
    Page<TaoGoodCartResult> customPageList(@Param("page") Page page, @Param("paramCondition") TaoGoodCartParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author lcw
     * @Date 2019-09-25
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") TaoGoodCartParam paramCondition);

    /**
     * 购物车查看选中的商品
     *
     * @author lcw
     * @Date 2019-09-25
     */
    List<Map<String, Object>> getgoodCartbyphone(@Param("phone") String phone);

    /**
     * 删除购物车山沟
     *
     * @author lcw
     * @Date 2019-09-25
     */
    void deleteBygoodId(@Param("goodId") String goodId,@Param("openId") String openId);

    /**
     * 删除购物车山沟
     *
     * @author lcw
     * @Date 2019-09-25
     */
    void deleteByType(@Param("paramCondition") TaoGoodCartParam paramCondition);

}
